// yada yada

#include <iostream>

#include "discount.hpp"

int main()
{
    int purchases[] = {0, 10, 50, 100, 139, 140, 150};

    std::cout << "11.1\n\n"; 
    for(size_t i = 0; i < sizeof(purchases)/sizeof(*purchases); i++)
    {
        std::cout << Discount::get_discount(Discount::Trinket::bronze, purchases[i]) << " discount for bronze costing " << purchases[i] << "\n";
        std::cout << Discount::get_discount(Discount::Trinket::silver, purchases[i]) << " discount for silver costing " << purchases[i] << "\n";
        std::cout << Discount::get_discount(Discount::Trinket::gold, purchases[i]) << " discount for gold costing " << purchases[i] << "\n";
    }

    std::cout << "\n11.1 alternative\n\n"; 
    for(size_t i = 0; i < sizeof(purchases)/sizeof(*purchases); i++)
    {
        std::cout << Discount::get_discount2(Discount::Trinket2::bronze, purchases[i]) << " discount for bronze costing " << purchases[i] << "\n";
        std::cout << Discount::get_discount2(Discount::Trinket2::silver, purchases[i]) << " discount for silver costing " << purchases[i] << "\n";
        std::cout << Discount::get_discount2(Discount::Trinket2::gold, purchases[i]) << " discount for gold costing " << purchases[i] << "\n";
    }

    std::cout << "\n11.2\n\n";

    std::cout << "is gold cheaper than platinum? " << (Discount::is_cheaper(Discount::Trinket3::gold, Discount::Trinket3::platinum) ? "yes" : "no") << "\n";

    std::cout << "is platinum cheaper than diamond? " << (Discount::is_cheaper(Discount::Trinket3::platinum, Discount::Trinket3::diamond) ? "yes" : "no") << "\n";

    std::cout << "is bronze cheaper than bronze? " << (Discount::is_cheaper(Discount::Trinket3::bronze, Discount::Trinket3::bronze) ? "yes" : "no") << "\n";
    
    std::cout << "is diamond cheaper than silver? " << (Discount::is_cheaper(Discount::Trinket3::diamond, Discount::Trinket3::silver) ? "yes" : "no") << "\n";

    std::cout << "what is the price difference between bronze and diamond? " << Discount::get_difference(Discount::Trinket3::bronze, Discount::Trinket3::diamond) << " EUR/gram\n";

    std::cout << "what is the price difference between platinum and diamond? " << Discount::get_difference(Discount::Trinket3::platinum, Discount::Trinket3::diamond) << " EUR/gram\n";

    // all good
    return 0;
}